package com.ajaxjs.user.controller;

import javax.mvc.annotation.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;

import com.ajaxjs.mvc.controller.IController;

@Controller
@Path("/admin")
public class AdminUIController implements IController {
	@GET
	public String get(HttpServletRequest request, HttpServletResponse response) {
		String action = request.getParameter("action");

		if (action != null) {
			switch (action) {
			case "workbench":
				return "/WEB-INF/jsp/user/admin/workbench";
			case "logout":
				return "html::已退出！";
			default:
				return "html::无效 action！";
			}
		} else {
			return "/WEB-INF/jsp/user/admin/index";
		}
	}
}
